package app.android.kdictionary.aidl;

import java.util.ArrayList;

import android.os.Parcel;
import android.os.Parcelable;

public class SearchResultData implements Parcelable {
	private int webViewSize;
	private ArrayList<WebViewContent> webViewContentList;
	
	public static final Parcelable.Creator<SearchResultData> CREATOR = new Parcelable.Creator<SearchResultData>() {
		@Override
		public SearchResultData createFromParcel(Parcel in) {
			return new SearchResultData(in);
		}

		@Override
		public SearchResultData[] newArray(int size) {
			return new SearchResultData[size];
		}
	};
	
    public SearchResultData() {
    }
    
    public SearchResultData(int webViewSize, ArrayList<WebViewContent> webViewContentList) {
    	this.webViewSize = webViewSize;
    	this.webViewContentList = webViewContentList;
    }
	
    private SearchResultData(Parcel in) {
        readFromParcel(in);
    }
	
	@Override
	public int describeContents() {
		return 0;
	}
	
	@Override
	public void writeToParcel(Parcel out, int flag) {
        out.writeInt(webViewSize);
        out.writeList(webViewContentList);
	}

    public void readFromParcel(Parcel in) {
    	webViewSize = in.readInt();
    	webViewContentList = in.readArrayList(WebViewContent.class.getClassLoader());
    }

	public int getWebViewSize() {
		return webViewSize;
	}

	public void setWebViewSize(int webViewSize) {
		this.webViewSize = webViewSize;
	}

	public ArrayList<WebViewContent> getWebViewContentList() {
		return webViewContentList;
	}

	public void setWebViewContentList(ArrayList<WebViewContent> webViewContentList) {
		this.webViewContentList = webViewContentList;
	}
}
